#ifndef VUser_H
#define VUser_H

#include <QWidget>
#include <QPushButton>
#include <QLabel>
#include <QSpinBox>
#include <QGridLayout>
#include <QDateTime>
#include <QTextEdit>
#include <QScrollBar>

#include "../Controlers/CNetwork.h"
#include "../Controlers/CUser.h"

class VUser : public QWidget
{
    Q_OBJECT
    private:
    QTextEdit *log_label;
    QScrollBar *vertical_scrollbar;
    QLabel *port_label;
    QPushButton *start_button;
    QSpinBox *port_spin;

    QGridLayout *layoutp;

    CUser *c_user;
    public:
        VUser();
        ~VUser();

        void addLogLine(QString content, QString color);

    public slots:
        void start();
        void new_client();
        void authentification_ok(QString username, QString password);
        void authentification_failed(QString username, QString password);
        void receive_chat();
        void disconnect();
};

#endif // VUser_H
